package com.qfedu.dao;

import com.qfedu.entity.Cargoreceiptdetail;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface CargoreceiptdetailDao extends JpaRepository<Cargoreceiptdetail,String> {

    Cargoreceiptdetail save(Cargoreceiptdetail cargoreceiptdetail);

    Cargoreceiptdetail findByGoodsRevertBillId(String goodsReverBillId);

    @Query(value = "select * from cargoreceiptdetail where goods_revert_bill_id " +
            " not in (select goods_revert_bill_code from cargoreceipt)",nativeQuery = true)
    List<Cargoreceiptdetail> selectAllUnSet();


}
